<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8" />
  <title>华东手机柱状图</title>
</head>

<body>
<svg id="svg-graph" xmlns="http://wwww.w3.org/2000/svg" version='1.1' baseProfile="full" width='500' height="500"  style="border:solid 1px red"></svg>
</body>
</html>
<script src="bar.js"></script>
<script>

let data = {
  product: "手机",
  region: "华东",
  sale: [120, 100, 140, 160, 180, 185, 190, 210, 230, 245, 255, 270]
}

darw(data.sale,400,400)



</script>